package com.zy.bean1;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
@Data
public class Product {

    @Value("1001")   // DI 依赖注入  （利用属性完成DI )
    private int id;
    @Value("小米SU7")
    private String pname;
}
